<!doctype html>
<html>
<head>
<#include "/part_meta.ftl">
<title>进货单编辑-迈小众</title>
<link href="${st.resDomain}/css/style.css" rel="stylesheet">
<link href="${st.resDomain}/css/form-base.css" rel="stylesheet">
<link href="${st.resDomain}/css/MC-base.css" rel="stylesheet">
<link href="${st.resDomain}/css/MC.css" rel="stylesheet">
</head>

<body>
<!--- header --->
<div id="header">
  <div class="main f_clear">
  	<div class="logo"><h2><@shiro.principal property="s_name" /></h2><span>您好！<@shiro.principal property="m_name" />， <a href="${st.domain}/member/logoutDo">退出</a>&nbsp;&nbsp;&nbsp;[ <a href="${st.shopDomain}/localSale/v1.1" target="_blank">进行线下销售</a> ]</span></div>
    <div class="f_right"><a href="${st.userDomain}">个人中心</a> <a href="${st.shopDomain}" class="selected">店铺管理</a><@shiro.hasRole name="FIRM"><a href="${st.firmDomain}">企业管理</a></@shiro.hasRole></div>
  </div>
</div>
<!--- header end--->
<!--topnav -->
<div id="topnav">
  <div class="main">
    <ul class="left">      
      
      <li><a href="${st.shopDomain}/order/list?statuses=0">订单</a></li>
      <li class="selected"><a href="${st.shopDomain}/storeGoods/list">商品</a></li>
      <li><a href="${st.shopDomain}/memberVip">会员</a></li>      
      <li><a href="${st.shopDomain}/store/edit">店铺</a></li>      
      <li><a href="${st.shopDomain}/goodsReport">数据</a></li>
    </ul>
  </div>
</div>
<!--topnav end-->
<div id="main" class="f_clear">
  <div id="left">
    <ul id="menu1">
      <li><a href="${st.shopDomain}/storeGoods/list">店铺商品</a></li>
      <li><a href="${st.shopDomain}/store/onlineSetting">线上销售</a></li>
      <li style="margin-left:10px;"><a href="${st.shopDomain}/goodsPromote/list?id.type=0">商品促销</a></li>
      <li style="margin-left:10px;"><a href="${st.shopDomain}/storePromote/list?type=0">满额促销</a></li>
      <li><a href="${st.shopDomain}/store/localSetting">线下销售</a></li>
      <li style="margin-left:10px;"><a href="${st.shopDomain}/goodsPromote/list?id.type=2">商品促销</a></li>
      <li style="margin-left:10px;"><a href="${st.shopDomain}/storePromote/list?type=2">满额促销</a></li>
      
      <li style="margin-left:10px;"><a href="${st.shopDomain}/localSale/soft">离线版本</a></li>
      <li class="selected"><a href="${st.shopDomain}/storeRestock/list?isChecked=0">进货管理</a></li>
      <li><a href="${st.shopDomain}/storeGoods/add">商品入库</a></li>
    </ul>
  </div>
  <div id="right">
    <div id="title">进货管理 - <#if sr??>编辑进货单<#else>添加进货单</#if></div>
    <div id="cxhd">
     <form id="storeRestockForm">
      <div class="form val">
       <input name="restockId" type="hidden" value="${sr.restockId}"/>
        <p>
          <label>供货商：</label>
          <!-- <select name="supplier" value="${sr.supplier}">
            <option value="">-选择-</option>
          </select> --> 
          <input type="text" name="supplier" value="${sr.supplier}" style="width:200px;">
        </p>
        <div>
          <p>
            <label>保存方式：</label>
            <label><input name="isChecked" type="radio" value="true" data-rule="checked">保存入库</label>
            <label><input name="isChecked" type="radio" value="false">仅保存</label>
          </p>
        </div>
        <div id="srgDiv">
          <p>
            <label>进货商品：</label>
            <span id="giftctrl_0" style="display:none;"><span style="float:left; padding-left:5px">还可以添加6个赠送商品</span><a href="javascript:;" id="giftEditBt" style="color: #06C;">设置</a></span> <span id="giftctrl_1" style="width:280px;">
              <input type="text" id="srgSearchWord" placeholder="商品名称/编码" style="width:200px;">
          <input type="submit" id="srgSearchBt_0" onclick="return false;" class="feignhide"><!-- 实现回车查找 -->
          <a href="javascript:;" id="srgSearchBt_1" class="btn3" style="width:25px;float:left;">查找</a></span>
          <span for="srgAmount" class="msg-box n-right"></span>
          <input type="hidden" id="srgAmount" value=""/> </p>
          <table width="780" border="0" cellspacing="0" cellpadding="0" id="zssp" style="margin-left:20px">
            <tr id="FirstTr">
              <th></th>
              <th width="300">商品</th>
              <th width="120" colspan=2>原有库存处理方式</th>
              <th>目标进货量</th>
              <th>成本合计</th>
              <th width="40">操作</th>
            </tr>
            <#list sr.storeRestockGoodses as srg>
             <tr>
				<td class="ch"><input type="checkbox" checked id="srgCh_${srg.storeGoods.storeGoodsId}" value="${srg.storeGoods.storeGoodsId}">&nbsp;</td>
				<td class="sp"><a href="javascript:;"><img src="${st.resDomain}/def/goods_pic.jpg" data="${srg.storeGoods.pic}">
				<span>${srg.storeGoods.barCode}<br>${srg.storeGoods.name}</span></a></td>
				<td>${srg.storeGoods.stockConvert}${srg.storeGoods.unit}</td>
				<td>
				 <#list srgTypes as type>
				  <label><input name="type_${srg.storeGoods.storeGoodsId}" type="radio" value="${type.value}" <#if type.value == srg.type>checked</#if> data-rule="checked">${type.text}</label>
				 </#list>
				</td>
				<td><input type="text" id="restock_${srg.storeGoods.storeGoodsId}" value="${srg.restock}" style="width:40px" data-rule="required;amount;range[0~9999]">${srg.storeGoods.unit}</td>
				<td><input type="text" id="selfCost_${srg.storeGoods.storeGoodsId}" value="${srg.selfCost}" style="width:60px" data-rule="required;money;range[0~9999]">元</td>
				<td><a id="delSrgBt_${srg.storeGoods.storeGoodsId}_${srg.storeGoods.name}">删除</a></td>
				</tr>
            </#list>
          </table>
        </div>
      </div>
      <div class="Submit f_clear" style="padding-left:35px">
       <a href="javascript:;" id="submitBt_1" class="btn1"><i></i><em>确定</em></a>
      </div>
     </form>
    </div>
  </div>
</div>
<!--footer-->
<div id="footer">Copyright© 迈小众 <span style="padding-left:30px;">客服QQ：<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=3101084438&site=qq&menu=yes" rel="nofollow"><img border="0" src="http://wpa.qq.com/pa?p=2:3101084438:50" alt="点击联系我们，QQ：3101084438" title="点击联系我们，QQ：3101084438"></a></span></div>
<!--footer end-->
<script data-main="${st.resDomain}/scripts/shop/storeRestock_addOrEdit" src="${st.resDomain}/scripts/require.js"></script>
</body>
</html>
